crypto = require 'crypto'

# MD5 加密
exports.md5 = (data) ->
  md5key = ''
  if data
    md5 = crypto.createHash 'md5'
    md5.update data,'utf8'
    result = md5.digest 'hex'
    md5key = result.toUpperCase()
  md5key